package com.guigu.ababa.ababaclassroom.service.Impl;

import com.guigu.ababa.ababaclassroom.dao.Ab_lecturerMapper;
import com.guigu.ababa.ababaclassroom.entity.Ab_lecturer;
import com.guigu.ababa.ababaclassroom.service.Ab_lecturerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Ab_lecturerServiceImpl implements Ab_lecturerService {

    //导入ablecturerMapper接口
    @Autowired
    Ab_lecturerMapper ab_lecturerMapper;

    //查询全部教师
    @Override
    public List<Ab_lecturer> Selectlecturer() {
        return ab_lecturerMapper.selectList(null);
    }

    @Override
    public int insertlecturer(Ab_lecturer ab_lecturer) {
        return ab_lecturerMapper.insert(ab_lecturer);
    }

    @Override
    public Ab_lecturer SelectoneId(int userid) {
        return ab_lecturerMapper.SelectoneId(userid);
    }

    @Override
    public int updatelecturer(Ab_lecturer ab_lecturer) {
        return ab_lecturerMapper.updateById(ab_lecturer);
    }
}
